<div class="b-island__title">
    {{'testrun.TESTRUN' | translate}}
    <span class="text-muted" translate="testrun.TIMEDATE" translate-value-date="{{time.start | date:'mediumDate'}}" translate-value-time="{{time.start | date:'HH:mm:ss'}}" translate-value-duration="{{time.duration | time}}"></span>
</div>
<div class="pane__header">
    <h3>{{'testrun.STATISTIC' | translate:'{suites: testsuites.length, cases: statistic.total}':'messageformat'}}
        <span class="label label-success" ng-show="statistic.total == statistic.passed">{{'testrun.PASSED' | translate}}</span>
    </h3>
</div>
<div ng-controller="TestSuitesCtrl" on-keynav="select($direction)">
    <div status-switcher statuses="showStatuses" class="pull-right"></div>
    <h4 class="pull-left">{{'testrun.TEST_SUITES' | translate}}</h4>
    <table allure-table class="test-list table table-hover table-condensed" sorting="sorting">
        <tbody>
        <tr class="total-row">
            <td class="line-ellipsis">
                {{'testrun.TOTAL' | translate:'{amount: testsuites.length}':'messageformat'}}
                <b translate="testrun.VISIBLE" translate-value-amount="{{testsuites.length}}" translate-value-visible="{{(testsuites | filter:statusFilter).length}}"></b>
            </td>
            <td class="line-nobreak">{{time.duration | time}}</td>
            <td class="text-center">
                <span class="label label-danger" ng-show="statistic.failed > 0">{{statistic.failed}}</span>
            </td>
            <td class="text-center">
                <span class="label label-warning" ng-show="statistic.broken > 0">{{statistic.broken}}</span>
            </td>
            <td class="text-center">
                <span class="label label-default" ng-show="statistic.canceled > 0">{{statistic.canceled}}</span>
            </td>
            <td class="text-center">
                <span class="label label-status-pending" ng-show="statistic.pending > 0">{{statistic.pending}}</span>
            </td>
            <td class="text-center">
                {{statistic.total}}
            </td>
        </tr>
        <tr ng-repeat="testsuite in list.items" class="testsuite-row clickable" ng-class="{'active':testsuite == $parent.testsuite}" ng-click="setTestsuite(testsuite.uid)">
            <td allure-table-col="{heading:'Title', predicate: 'title', flex: 6}" class="line-ellipsis" title="{{testsuite.title}}">
                {{testsuite.title}}
            </td>
            <td allure-table-col="{heading: 'Duration', predicate: 'time.duration', flex: 2, reverse: true}" class="line-ellipsis" title="{{testsuite.time.duration | time}}">
                {{testsuite.time.duration | time}}
            </td>
            <td allure-table-col="{heading: 'Failed', predicate: 'statistic.failed', class:'text-center', reverse: true}" class="text-center">
                <span class="label label-danger" ng-show="testsuite.statistic.failed > 0">{{testsuite.statistic.failed}}</span>
            </td>
            <td allure-table-col="{heading: 'Broken', predicate: 'statistic.broken', class:'text-center', reverse: true}" class="text-center">
                <span class="label label-warning" ng-show="testsuite.statistic.broken > 0">{{testsuite.statistic.broken}}</span>
            </td>
            <td allure-table-col="{heading: 'Canceled', predicate: 'statistic.canceled', class:'text-center', reverse: true}" class="text-center">
                <span class="label label-default" ng-show="testsuite.statistic.canceled > 0">{{testsuite.statistic.canceled}}</span>
            </td>
            <td allure-table-col="{heading: 'Pending', predicate: 'statistic.pending', class:'text-center', reverse: true}" class="text-center">
                <span class="label label-status-pending" ng-show="testsuite.statistic.pending > 0">{{testsuite.statistic.pending}}</span>
            </td>
            <td allure-table-col="{heading: 'Total', predicate: 'statistic.total', class:'text-center', reverse: true}" class="text-center">
                {{testsuite.statistic.total}}
            </td>
        </tr>
        </tbody>
    </table>
</div>
